import React, { Component } from 'react'
import qs from 'querystring'

export default class Detail extends Component {
  render() {
    console.log("props: ",this.props)

    // 接收params参数
    // const {id, title} = this.props.match.params

    // 接收search参数
    // const {search} = this.props.location
    // const {id, title} = qs.parse(search.slice(1))

    // 接收state参数
    const {id,title} = this.props.location.state

    return (
      <ul>
        <li>ID: {id}</li>
        <li>TITLE: {title}</li>
        <li>MESSAGE: hhh</li>
      </ul>
    )
  }
}
